package com.nip.irregularvebsdict.services;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.nip.irregularvebsdict.items.DateTimeItem;

public class ServicesUtilities {
	private static Date date;
	private static DateTimeItem dateTimeItem;
	private static SimpleDateFormat dateFormat;
	
	public static final int ACTION_UPDATE = 1;
	
	public static final String AM = "AM";

	public static final String UPDATE_TIME_KEY = "UPDATE_TIME_KEY";

	public static final int ACTION_UPDATE_WORD = 2;
	
	public static DateTimeItem getDateTime() {
		dateTimeItem = new DateTimeItem();
		date = new Date();
		dateFormat = new SimpleDateFormat("E, dd-MM-yyy");
		dateTimeItem.setDate(dateFormat.format(date));
		dateFormat = new SimpleDateFormat("hh:mm");
		dateTimeItem.setTime(dateFormat.format(date));
		dateFormat = new SimpleDateFormat("a");
		dateTimeItem.setIsAM(dateFormat.format(date).equalsIgnoreCase(
				ServicesUtilities.AM));

		return dateTimeItem;
	}
}
